* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #121212;
    color: #e0e0e0;
}

header {
    background-color: #1a1a1a;
    border-bottom: 3px solid #ff4500;
    padding: 1rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: #ff4500;
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 1.5rem;
}

.nav-links a {
    color: #e0e0e0;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: #ff4500;
}

main {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

h1, h2 {
    color: #ff4500;
    margin-bottom: 1.5rem;
}

.dashboard-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.card {
    background-color: #1e1e1e;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    border-left: 3px solid #ff4500;
    transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(255, 69, 0, 0.3);
}

.card-title {
    font-size: 1rem;
    color: #999;
    margin-bottom: 0.5rem;
}

.card-value {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.card-trend {
    display: flex;
    align-items: center;
    font-size: 0.9rem;
}

.trend-up {
    color: #ff4500;
}

.trend-down {
    color: #4caf50;
}

.danger {
    color: #ff4500;
}

.warning {
    color: #ff9800;
}

.safe {
    color: #4caf50;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
}

.chart-container {
    background-color: #1e1e1e;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    margin-bottom: 1.5rem;
    border-top: 3px solid #ff4500;
    position: relative;
    height: 400px;
}

.sensor-list {
    background-color: #1e1e1e;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    border-top: 3px solid #ff4500;
}

.sensor-item {
    display: flex;
    justify-content: space-between;
    padding: 0.8rem 0;
    border-bottom: 1px solid #333;
}

.sensor-item:last-child {
    border-bottom: none;
}

.sensor-name {
    font-weight: 500;
}

.map-container {
    height: 400px;
    background-color: #1e1e1e;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    margin-bottom: 1.5rem;
    border-top: 3px solid #ff4500;
}

.status-list {
    background-color: #1e1e1e;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    border-top: 3px solid #ff4500;
}

.status-item {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 10px;
}

.active {
    background-color: #4caf50;
    box-shadow: 0 0 8px #4caf50;
}

.inactive {
    background-color: #ff4500;
    box-shadow: 0 0 8px #ff4500;
}

.weather-info {
    background-color: #1e1e1e;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    margin-bottom: 1.5rem;
    border-top: 3px solid #ff4500;
}

.weather-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-top: 1rem;
}

.weather-item {
    display: flex;
    flex-direction: column;
}

.weather-label {
    font-size: 0.9rem;
    color: #999;
}

.weather-value {
    font-size: 1.2rem;
    font-weight: bold;
}

canvas {
    width: 100%;
    height: 10px;
    background-color: #252525;
    border-radius: 4px;
}

footer {
    background-color: #1a1a1a;
    color: #999;
    text-align: center;
    padding: 1.5rem;
    margin-top: 2rem;
    border-top: 3px solid #ff4500;
}

.alerts-container {
    background-color: #1e1e1e;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    margin-bottom: 1.5rem;
    border-top: 3px solid #ff4500;
}

.alert {
    padding: 0.8rem;
    margin-bottom: 0.8rem;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.alert-danger {
    background-color: rgba(255, 69, 0, 0.2);
    border-left: 4px solid #ff4500;
}

.alert-warning {
    background-color: rgba(255, 152, 0, 0.2);
    border-left: 4px solid #ff9800;
}

.alert-info {
    background-color: rgba(33, 150, 243, 0.2);
    border-left: 4px solid #2196f3;
}

.alert-time {
    font-size: 0.8rem;
    color: #999;
}

#sensorMap {
    height: 300px; 
    border-radius: 4px;
}

@media (max-width: 768px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

/* Styles pour la mini-carte */
.sensor-marker {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    position: absolute;
    transform: translate(-50%, -50%);
    cursor: pointer;
    transition: all 0.3s ease;
}

.sensor-marker:hover {
    transform: translate(-50%, -50%) scale(1.5);
    z-index: 100;
}

.marker-normal {
    background-color: #4caf50;
    box-shadow: 0 0 10px #4caf50;
}

.marker-warning {
    background-color: #ff9800;
    box-shadow: 0 0 10px #ff9800;
}

.marker-danger {
    background-color: #ff4500;
    box-shadow: 0 0 10px #ff4500;
}

.sensor-tooltip {
    position: absolute;
    background-color: #333;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    z-index: 101;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
}

.sensor-marker:hover .sensor-tooltip {
    opacity: 1;
}